/*
 * Project: BoboDesignPattern
 * 
 * File Created at 2016年8月16日
 * 
 * Copyright 2012 Greenline.com Corporation Limited.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * Greenline Company. ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with Greenline.com.
 */
package composite;

/**
 * @Type Title
 * @Desc
 * @author boboge
 * @date 2016年8月16日
 * @Version V1.0
 */
public class Title extends Category {

    /**
     * @param name
     */
    public Title(String name) {
        super(name);
    }

    /*
     * (non-Javadoc)
     * 
     * @see composite.Category#add(composite.Category)
     */
    @Override
    public void add(Category category) {
        System.out.println("null");
    }

    /*
     * (non-Javadoc)
     * 
     * @see composite.Category#remove(composite.Category)
     */
    @Override
    public void remove(Category category) {
        System.out.println("null");

    }

    /*
     * (non-Javadoc)
     * 
     * @see composite.Category#display(int)
     */
    @Override
    public void display(int x) {
        StringBuffer sBuffer = new StringBuffer();
        for (int i = 0; i < x; i++) {
            sBuffer.append("-");
        }
        System.out.println(sBuffer + name);
    }

}
